﻿/*
 * @Description:类型文件
 * @Author: maskMan
 * @LastEditTime: 2024-01-25 11:19:43
 */
/**Function签名*/
export type Fun = (ret: any) => void;
export type WXInfo = { openid?: string; nickName: string; avatar: string; code?: string };
export type Obj = Record<string, any>;
export type H5Parm = { code: string; state: string; [key: string]: any };
/**方向排序 */
export interface ISort {
  /**方向 */
  dir: 1 | -1;
  /**排序依据 */
  key: string;
  /**限制 */
  limit: number;
}
/**
 * @description: 用户信息
 * @return {*}
 */
export interface IUserInfo {
  agentId: number;
  userId: string;
  nickName: string;
  avaUrl: string;
  socketId: string;
  seatIndex: number;
  online: boolean;
  ready: boolean;
  roomId: string;
  isInGame: boolean;
  playIng: boolean;
}
/**Mongo数据表 */
export enum MonTable {
  /**用户表 */
  user = "t_user",
  /**房间表 */
  room = "t_room",
  /**记录存储 */
  record = "t_record",
  /**公共信息*/
  public = "t_public",
  /**任务表 */
  task = "t_task",
  /**道具表 */
  prop = "t_prop",
  /**商店表 */
  shop = "t_shop",
  /*管理员表*/
  admin = "t_admin",
  /**代理表 */
  agent = "t_agent",
  /**支付记录 */
  pay = "t_pay",
  /**公告 */
  notice = "notice",
  /**递增记录列表 */
  incre = "t_incre",
}
/**用户 */
export interface MonUser {
  _id?: any;
  /**用户ID唯一 */
  uid?: number;
  /**openid唯一*/
  openid: string;
  /**是否新用户 */
  new?: boolean;
  /**昵称 */
  nickName?: string;
  /**头像地址 */
  avaUrl?: string;
  /**当前得分 */
  score?: number;
  /**最大得分 */
  maxScore?: number;
  /**金币数 */
  coins?: number;
  /**备注信息 */
  commit?: string;
}
export interface Monconf {
  dbName: string;
  user: string;
  password: string;
}
